function total = import2008table(filename, dataLines)
%IMPORTFILE Import data from a text file
%  TOTAL = IMPORTFILE(FILENAME) reads data from text file FILENAME for
%  the default selection.  Returns the data as a table.
%
%  TOTAL = IMPORTFILE(FILE, DATALINES) reads data for the specified row
%  interval(s) of text file FILENAME. Specify DATALINES as a positive
%  scalar integer or a N-by-2 array of positive scalar integers for
%  dis-contiguous row intervals.
%
%  Example:
%  total = importfile("C:\Users\jcrozier\OneDrive - University Of Oregon\Documents\Crack_waves\TQ_20080101T000000_20111229T000000\TQ_table\total.csv", [2, Inf]);
%
%  See also READTABLE.
%
% Auto-generated by MATLAB on 28-Feb-2020 17:16:57

%% Input handling

% If dataLines is not specified, define defaults
if nargin < 2
    dataLines = [2, Inf];
end

%% Setup the Import Options and import the data
opts = delimitedTextImportOptions("NumVariables", 126);

% Specify range and delimiter
opts.DataLines = dataLines;
opts.Delimiter = ",";

% Specify column names and types
opts.VariableNames = ["T", "stdamp", "meanamp", "medamp", "minamp", "maxamp", "rangeamp", "prom", "Tind", "startind", "start", "Acwt", "Q", "g", "Afit", "cfit", "rsquare", "dfe", "adjrsquare", "rmse", "goodness", "windowstartTime", "channelCount", "amp_HV_NPB_HHE", "amp_HV_NPB_HHN", "amp_HV_NPB_HHZ", "amp_HV_SRM_HHE", "amp_HV_SRM_HHN", "amp_HV_SRM_HHZ", "amp_HV_NPT_HHE", "amp_HV_NPT_HHN", "amp_HV_NPT_HHZ", "amp_HV_OBL_HHE", "amp_HV_OBL_HHN", "amp_HV_OBL_HHZ", "amp_HV_WRM_HHE", "amp_HV_WRM_HHN", "amp_HV_WRM_HHZ", "amp_HV_SDH_HHE", "amp_HV_SDH_HHN", "amp_HV_SDH_HHZ", "amp_HV_UWE_HHE", "amp_HV_UWE_HHN", "amp_HV_UWE_HHZ", "amp_HV_UWB_HHE", "amp_HV_UWB_HHN", "amp_HV_UWB_HHZ", "amp_HV_SBL_HHE", "amp_HV_SBL_HHN", "amp_HV_SBL_HHZ", "amp_HV_KKO_HHE", "amp_HV_KKO_HHN", "amp_HV_KKO_HHZ", "amp_HV_RIMD_HHE", "amp_HV_RIMD_HHN", "amp_HV_RIMD_HHZ", "phase_HV_NPB_HHE", "phase_HV_NPB_HHN", "phase_HV_NPB_HHZ", "phase_HV_SRM_HHE", "phase_HV_SRM_HHN", "phase_HV_SRM_HHZ", "phase_HV_NPT_HHE", "phase_HV_NPT_HHN", "phase_HV_NPT_HHZ", "phase_HV_OBL_HHE", "phase_HV_OBL_HHN", "phase_HV_OBL_HHZ", "phase_HV_WRM_HHE", "phase_HV_WRM_HHN", "phase_HV_WRM_HHZ", "phase_HV_SDH_HHE", "phase_HV_SDH_HHN", "phase_HV_SDH_HHZ", "phase_HV_UWE_HHE", "phase_HV_UWE_HHN", "phase_HV_UWE_HHZ", "phase_HV_UWB_HHE", "phase_HV_UWB_HHN", "phase_HV_UWB_HHZ", "phase_HV_SBL_HHE", "phase_HV_SBL_HHN", "phase_HV_SBL_HHZ", "phase_HV_KKO_HHE", "phase_HV_KKO_HHN", "phase_HV_KKO_HHZ", "phase_HV_RIMD_HHE", "phase_HV_RIMD_HHN", "phase_HV_RIMD_HHZ", "fm_start", "fm_A_above_LTA", "fm_STALTA", "fm_Afrac", "fm_HV_NPB_HHE", "fm_HV_NPB_HHN", "fm_HV_NPB_HHZ", "fm_HV_SRM_HHE", "fm_HV_SRM_HHN", "fm_HV_SRM_HHZ", "fm_HV_NPT_HHE", "fm_HV_NPT_HHN", "fm_HV_NPT_HHZ", "fm_HV_OBL_HHE", "fm_HV_OBL_HHN", "fm_HV_OBL_HHZ", "fm_HV_WRM_HHE", "fm_HV_WRM_HHN", "fm_HV_WRM_HHZ", "fm_HV_SDH_HHE", "fm_HV_SDH_HHN", "fm_HV_SDH_HHZ", "fm_HV_UWE_HHE", "fm_HV_UWE_HHN", "fm_HV_UWE_HHZ", "fm_HV_UWB_HHE", "fm_HV_UWB_HHN", "fm_HV_UWB_HHZ", "fm_HV_SBL_HHE", "fm_HV_SBL_HHN", "fm_HV_SBL_HHZ", "fm_HV_KKO_HHE", "fm_HV_KKO_HHN", "fm_HV_KKO_HHZ", "fm_HV_RIMD_HHE", "fm_HV_RIMD_HHN", "fm_HV_RIMD_HHZ"];
opts.VariableTypes = ["double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "datetime", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "datetime", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "datetime", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double"];

% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";

% Specify variable properties
opts = setvaropts(opts, "start", "InputFormat", "dd-MMM-yyyy HH:mm:ss");
opts = setvaropts(opts, "windowstartTime", "InputFormat", "dd-MMM-yyyy HH:mm:ss");
opts = setvaropts(opts, "fm_start", "InputFormat", "dd-MMM-yyyy HH:mm:ss");

% Import the data
total = readtable(filename, opts);

end